package mybag1;

import java.util.Scanner;

public class Baoma extends Jiaoche {

	@Override
	public void calculate() {
		Scanner input = new Scanner(System.in);
		System.out.println("请选择你要租赁的汽车类型：1.X6 2.550i");
		int num = input.nextInt();
		System.out.println("请输入你要租赁的天数：");
		int day = input.nextInt();
		if (num == 1) {
			System.out.println("分配给您的汽车牌号是：京NY28588");
		} else if (num == 2) {
			System.out.println("分配给您的汽车牌号是：京CNY3284");
		} else {
			System.out.println("您输入的有误！！");
		}
		if (num == 1 && day > 0 && day <= 7) {
			rent = 800 * day;
		} else if (num == 1 && day > 7 && day <= 30) {
			rent = 800 * day * 0.9;
		} else if (num == 1 && day > 30 && day <= 150) {
			rent = 800 * day * 0.8;
		} else if (num == 1 && day > 150) {
			rent = 800 * day * 0.7;
		}
		if (num == 2 && day > 0 && day <= 7) {
			rent = 600 * day;
		} else if (num == 2 && day > 7 && day <= 30) {
			rent = 600 * day * 0.9;
		} else if (num == 2 && day > 30 && day <= 150) {
			rent = 600 * day * 0.8;
		} else if (num == 2 && day > 150) {
			rent = 600 * day * 0.7;
		}
		System.out.println("您需要支付的租赁费用是：" + rent);
	}

}
